/*
 Navicat Premium Data Transfer

 Source Server         : java
 Source Server Type    : MySQL
 Source Server Version : 80026
 Source Host           : localhost:3306
 Source Schema         : recruitdb

 Target Server Type    : MySQL
 Target Server Version : 80026
 File Encoding         : 65001

 Date: 06/03/2022 16:53:18
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for tb_employ
-- ----------------------------
DROP TABLE IF EXISTS `tb_employ`;
CREATE TABLE `tb_employ`
(
    `id`             bigint NOT NULL AUTO_INCREMENT,
    `user_id`        bigint                                                        DEFAULT NULL COMMENT '用户id',
    `post_id`        bigint                                                        DEFAULT NULL COMMENT '岗位id',
    `time`           datetime                                                      DEFAULT NULL COMMENT '投递时间',
    `status`         int                                                           DEFAULT NULL COMMENT '审核状态：0已投递，1审核中，2审核通过，3淘汰，4面试中，5面试通过，6面试淘汰，7资格审查中，8资格审查淘汰，9入职',
    `first_time`     datetime                                                      DEFAULT NULL COMMENT '第一次审核时间',
    `first_people`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '第一次审核人',
    `second_time`    datetime                                                      DEFAULT NULL COMMENT '第二次安排面试时间',
    `second_people`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '第二次安排人',
    `third_time`     datetime                                                      DEFAULT NULL COMMENT '第三次面试通过时间',
    `third_people`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '第三次面试官',
    `third_evaluate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '第三次面试评价',
    `forth_time`     datetime                                                      DEFAULT NULL COMMENT '第四次审查时间',
    `forth_people`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '第四次审查官',
    `utc_create`     datetime                                                      DEFAULT NULL COMMENT '创建时间',
    `utc_modify`     datetime                                                      DEFAULT NULL COMMENT '修改时间',
    `create_by`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
    `modify_by`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
    `valid`          bit(1)                                                        DEFAULT NULL COMMENT '是否有效',
    `remark`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `fk_emp_userId` (`user_id`),
    KEY `fk_emp_postId` (`post_id`),
    CONSTRAINT `fk_emp_postId` FOREIGN KEY (`post_id`) REFERENCES `tb_post` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT `fk_emp_userId` FOREIGN KEY (`user_id`) REFERENCES `tb_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB
  AUTO_INCREMENT = 4
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci;

-- ----------------------------
-- Table structure for tb_post
-- ----------------------------
DROP TABLE IF EXISTS `tb_post`;
CREATE TABLE `tb_post`
(
    `id`          bigint NOT NULL AUTO_INCREMENT COMMENT '岗位id',
    `name`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '岗位名称',
    `college`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '所属院部',
    `number`      int                                                           DEFAULT NULL COMMENT '招聘人数',
    `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '职位描述',
    `require`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '职位要求',
    `education`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '学历',
    `degree`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '学位',
    `age`         int                                                           DEFAULT NULL COMMENT '年龄',
    `deadline`    datetime                                                      DEFAULT NULL COMMENT '截止时间',
    `start_time`  datetime                                                      DEFAULT NULL COMMENT '开始时间',
    `utc_create`  datetime                                                      DEFAULT NULL COMMENT '创建时间',
    `utc_modify`  datetime                                                      DEFAULT NULL COMMENT '修改时间',
    `create_by`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
    `modify_by`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
    `valid`       bit(1)                                                        DEFAULT NULL COMMENT '是否有效',
    `remark`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci;

-- ----------------------------
-- Table structure for tb_user
-- ----------------------------
DROP TABLE IF EXISTS `tb_user`;
CREATE TABLE `tb_user`
(
    `id`              bigint NOT NULL AUTO_INCREMENT COMMENT '用户id',
    `username`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户名',
    `password`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '密码',
    `name`            varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '姓名',
    `phone`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '电话',
    `sex`             varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '性别',
    `identity_num`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '身份证号码',
    `email`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
    `photo`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '照片',
    `nation`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '民族',
    `access`          varchar(255) COLLATE utf8mb4_general_ci                       DEFAULT NULL COMMENT '角色',
    `politics_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '政治面貌',
    `marital_status`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '婚姻状况',
    `school`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '毕业院校',
    `graduation_date` datetime                                                      DEFAULT NULL COMMENT '毕业时间',
    `major`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '所学专业',
    `education`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最高学历',
    `degree`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最高学位',
    `attachment`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '简历附件',
    `utc_create`      datetime                                                      DEFAULT NULL COMMENT '创建时间',
    `utc_modify`      datetime                                                      DEFAULT NULL COMMENT '修改时间',
    `create_by`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
    `modify_by`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
    `valid`           bit(1)                                                        DEFAULT NULL COMMENT '是否有效',
    `remark`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `username` (`username`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 2
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci;

-- ----------------------------
-- Records of tb_user
-- ----------------------------
BEGIN;
INSERT INTO `tb_user`
VALUES (1, 'admin', 'admin', '管理员', NULL, NULL, NULL, NULL, NULL, NULL, 'admin', NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
